package com.ourteam.datawarehouse.dao;
/**
 * Template Name : DAO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Aug 18 15:51:23 CST
 * 2017 Auto Generate Date : 2019-02-13 11:54:29 Warning ! This file will be overwrite when
 * regenerate !
 */
import org.apache.commons.lang.StringUtils;

public class DataSource implements java.io.Serializable {

  public DataSource() {
    super();
  }

  private long id;

  /** Attribute id Be Seted Falg */
  private boolean idSetted = false;

  /** Attribute id is Null Falg */
  private boolean idNull = false;

  /**
   * Get id
   *
   * @return long
   */
  public final long getId() {

    return id;
  }

  /**
   * Set id
   *
   * @param long
   */
  public final void setId(long id) {

    this.id = id;

    this.idSetted = true;

    this.setIdNull(false);
  }

  /**
   * Get id Has Been Setted
   *
   * @return boolean
   */
  public final boolean isIdSetted() {
    return this.idSetted;
  }

  /** Set id Null */
  public final void setIdNull() {

    this.idNull = true;
  }

  public final void setIdNull(boolean aNullFlag) {

    this.idNull = aNullFlag;
  }

  public final boolean isIdNull() {

    return this.idNull;
  }

  private String dataSourceType;

  /** Attribute dataSourceType Be Seted Falg */
  private boolean dataSourceTypeSetted = false;

  /** Attribute dataSourceType is Null Falg */
  private boolean dataSourceTypeNull = false;

  /**
   * Get dataSourceType
   *
   * @return String
   */
  public final String getDataSourceType() {

    if (isDataSourceTypeNull()) {
      return null;
    } else {
      return StringUtils.trim(dataSourceType);
    }
  }

  /**
   * Set dataSourceType
   *
   * @param String
   */
  public final void setDataSourceType(String dataSourceType) {

    this.dataSourceType = StringUtils.trim(dataSourceType);

    this.dataSourceTypeSetted = true;

    this.setDataSourceTypeNull(this.dataSourceType == null);
  }

  /**
   * Get dataSourceType Has Been Setted
   *
   * @return boolean
   */
  public final boolean isDataSourceTypeSetted() {
    return this.dataSourceTypeSetted;
  }

  /** Set dataSourceType Null */
  public final void setDataSourceTypeNull() {

    this.dataSourceTypeNull = true;
  }

  public final void setDataSourceTypeNull(boolean aNullFlag) {

    this.dataSourceTypeNull = aNullFlag;
  }

  public final boolean isDataSourceTypeNull() {

    return this.dataSourceTypeNull;
  }

  private String dataSourceCode;

  /** Attribute dataSourceCode Be Seted Falg */
  private boolean dataSourceCodeSetted = false;

  /** Attribute dataSourceCode is Null Falg */
  private boolean dataSourceCodeNull = false;

  /**
   * Get dataSourceCode
   *
   * @return String
   */
  public final String getDataSourceCode() {

    if (isDataSourceCodeNull()) {
      return null;
    } else {
      return StringUtils.trim(dataSourceCode);
    }
  }

  /**
   * Set dataSourceCode
   *
   * @param String
   */
  public final void setDataSourceCode(String dataSourceCode) {

    this.dataSourceCode = StringUtils.trim(dataSourceCode);

    this.dataSourceCodeSetted = true;

    this.setDataSourceCodeNull(this.dataSourceCode == null);
  }

  /**
   * Get dataSourceCode Has Been Setted
   *
   * @return boolean
   */
  public final boolean isDataSourceCodeSetted() {
    return this.dataSourceCodeSetted;
  }

  /** Set dataSourceCode Null */
  public final void setDataSourceCodeNull() {

    this.dataSourceCodeNull = true;
  }

  public final void setDataSourceCodeNull(boolean aNullFlag) {

    this.dataSourceCodeNull = aNullFlag;
  }

  public final boolean isDataSourceCodeNull() {

    return this.dataSourceCodeNull;
  }

  private String dataSourceUrl;

  /** Attribute dataSourceUrl Be Seted Falg */
  private boolean dataSourceUrlSetted = false;

  /** Attribute dataSourceUrl is Null Falg */
  private boolean dataSourceUrlNull = false;

  /**
   * Get dataSourceUrl
   *
   * @return String
   */
  public final String getDataSourceUrl() {

    if (isDataSourceUrlNull()) {
      return null;
    } else {
      return StringUtils.trim(dataSourceUrl);
    }
  }

  /**
   * Set dataSourceUrl
   *
   * @param String
   */
  public final void setDataSourceUrl(String dataSourceUrl) {

    this.dataSourceUrl = StringUtils.trim(dataSourceUrl);

    this.dataSourceUrlSetted = true;

    this.setDataSourceUrlNull(this.dataSourceUrl == null);
  }

  /**
   * Get dataSourceUrl Has Been Setted
   *
   * @return boolean
   */
  public final boolean isDataSourceUrlSetted() {
    return this.dataSourceUrlSetted;
  }

  /** Set dataSourceUrl Null */
  public final void setDataSourceUrlNull() {

    this.dataSourceUrlNull = true;
  }

  public final void setDataSourceUrlNull(boolean aNullFlag) {

    this.dataSourceUrlNull = aNullFlag;
  }

  public final boolean isDataSourceUrlNull() {

    return this.dataSourceUrlNull;
  }

  private String dataSourceAccount;

  /** Attribute dataSourceAccount Be Seted Falg */
  private boolean dataSourceAccountSetted = false;

  /** Attribute dataSourceAccount is Null Falg */
  private boolean dataSourceAccountNull = false;

  /**
   * Get dataSourceAccount
   *
   * @return String
   */
  public final String getDataSourceAccount() {

    if (isDataSourceAccountNull()) {
      return null;
    } else {
      return StringUtils.trim(dataSourceAccount);
    }
  }

  /**
   * Set dataSourceAccount
   *
   * @param String
   */
  public final void setDataSourceAccount(String dataSourceAccount) {

    this.dataSourceAccount = StringUtils.trim(dataSourceAccount);

    this.dataSourceAccountSetted = true;

    this.setDataSourceAccountNull(this.dataSourceAccount == null);
  }

  /**
   * Get dataSourceAccount Has Been Setted
   *
   * @return boolean
   */
  public final boolean isDataSourceAccountSetted() {
    return this.dataSourceAccountSetted;
  }

  /** Set dataSourceAccount Null */
  public final void setDataSourceAccountNull() {

    this.dataSourceAccountNull = true;
  }

  public final void setDataSourceAccountNull(boolean aNullFlag) {

    this.dataSourceAccountNull = aNullFlag;
  }

  public final boolean isDataSourceAccountNull() {

    return this.dataSourceAccountNull;
  }

  private String dataSourcePassword;

  /** Attribute dataSourcePassword Be Seted Falg */
  private boolean dataSourcePasswordSetted = false;

  /** Attribute dataSourcePassword is Null Falg */
  private boolean dataSourcePasswordNull = false;

  /**
   * Get dataSourcePassword
   *
   * @return String
   */
  public final String getDataSourcePassword() {

    if (isDataSourcePasswordNull()) {
      return null;
    } else {
      return StringUtils.trim(dataSourcePassword);
    }
  }

  /**
   * Set dataSourcePassword
   *
   * @param String
   */
  public final void setDataSourcePassword(String dataSourcePassword) {

    this.dataSourcePassword = StringUtils.trim(dataSourcePassword);

    this.dataSourcePasswordSetted = true;

    this.setDataSourcePasswordNull(this.dataSourcePassword == null);
  }

  /**
   * Get dataSourcePassword Has Been Setted
   *
   * @return boolean
   */
  public final boolean isDataSourcePasswordSetted() {
    return this.dataSourcePasswordSetted;
  }

  /** Set dataSourcePassword Null */
  public final void setDataSourcePasswordNull() {

    this.dataSourcePasswordNull = true;
  }

  public final void setDataSourcePasswordNull(boolean aNullFlag) {

    this.dataSourcePasswordNull = aNullFlag;
  }

  public final boolean isDataSourcePasswordNull() {

    return this.dataSourcePasswordNull;
  }

  private String status;

  /** Attribute status Be Seted Falg */
  private boolean statusSetted = false;

  /** Attribute status is Null Falg */
  private boolean statusNull = false;

  /**
   * Get status
   *
   * @return String
   */
  public final String getStatus() {

    if (isStatusNull()) {
      return null;
    } else {
      return StringUtils.trim(status);
    }
  }

  /**
   * Set status
   *
   * @param String
   */
  public final void setStatus(String status) {

    this.status = StringUtils.trim(status);

    this.statusSetted = true;

    this.setStatusNull(this.status == null);
  }

  /**
   * Get status Has Been Setted
   *
   * @return boolean
   */
  public final boolean isStatusSetted() {
    return this.statusSetted;
  }

  /** Set status Null */
  public final void setStatusNull() {

    this.statusNull = true;
  }

  public final void setStatusNull(boolean aNullFlag) {

    this.statusNull = aNullFlag;
  }

  public final boolean isStatusNull() {

    return this.statusNull;
  }

  private String remarks;

  /** Attribute remarks Be Seted Falg */
  private boolean remarksSetted = false;

  /** Attribute remarks is Null Falg */
  private boolean remarksNull = false;

  /**
   * Get remarks
   *
   * @return String
   */
  public final String getRemarks() {

    if (isRemarksNull()) {
      return null;
    } else {
      return StringUtils.trim(remarks);
    }
  }

  /**
   * Set remarks
   *
   * @param String
   */
  public final void setRemarks(String remarks) {

    this.remarks = StringUtils.trim(remarks);

    this.remarksSetted = true;

    this.setRemarksNull(this.remarks == null);
  }

  /**
   * Get remarks Has Been Setted
   *
   * @return boolean
   */
  public final boolean isRemarksSetted() {
    return this.remarksSetted;
  }

  /** Set remarks Null */
  public final void setRemarksNull() {

    this.remarksNull = true;
  }

  public final void setRemarksNull(boolean aNullFlag) {

    this.remarksNull = aNullFlag;
  }

  public final boolean isRemarksNull() {

    return this.remarksNull;
  }

  public int hashCode() {
    final int prime = 31;
    int result = 1;

    result = prime * result + (int) (getId() ^ (getId() >>> 32));

    return result;
  }

  public boolean equals(Object obj) {

    if (obj == null) {
      return false;
    }
    if ((obj instanceof DataSource) == false) {
      return false;
    }
    DataSource other = (DataSource) obj;

    if (getId() != other.getId()) {
      return false;
    }

    return true;
  }

  public String toString() {

    StringBuffer buffer = new StringBuffer();

    buffer.append("[");

    buffer.append("id=");
    buffer.append(this.id);

    buffer.append("dataSourceType=");
    buffer.append(this.dataSourceType);

    buffer.append("dataSourceCode=");
    buffer.append(this.dataSourceCode);

    buffer.append("dataSourceUrl=");
    buffer.append(this.dataSourceUrl);

    buffer.append("dataSourceAccount=");
    buffer.append(this.dataSourceAccount);

    buffer.append("dataSourcePassword=");
    buffer.append(this.dataSourcePassword);

    buffer.append("status=");
    buffer.append(this.status);

    buffer.append("remarks=");
    buffer.append(this.remarks);

    buffer.append("]");

    return buffer.toString();
  }
}
